package com.cx.service.wjj.impl;


import com.cx.mapper.PageDeliveryMapper;
import com.cx.mapper.SiteMapper;
import com.cx.pojo.PageDelivery;
import com.cx.pojo.PageDeliveryExample;
import com.cx.pojo.Site;
import com.cx.pojo.SiteExample;
import com.cx.service.wjj.MapService;
import com.cx.vo.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MapServiceImpl implements MapService {
    @Autowired
    PageDeliveryMapper pageDeliveryMapper;
    @Autowired
    SiteMapper siteMapper;


    @Override
    public PageDelivery selectByPageNum(Integer pageNum){
        PageDeliveryExample example=new PageDeliveryExample();
        example.createCriteria().andPageNumEqualTo(pageNum);
        List<PageDelivery> pageDeliveryList = pageDeliveryMapper.selectByExample(example);
        System.out.println(pageDeliveryList.get(0));
        return pageDeliveryList.get(0);
    }

    @Override
    public  List<Site> selectAllSite() {
        ResponseResult responseResult = new ResponseResult();

        List<Site> siteList =  siteMapper.selectAll();

        return siteList;
    }


}
